//
//  DispatchBillTableViewCell.swift
//  ZNHXManagement
//
//  Created by 四川中农 on 2018/9/28.
//  Copyright © 2018年 四川中农. All rights reserved.
//

import UIKit

class DispatchBillTableViewCell: UITableViewCell {
    
    @IBOutlet weak var orderNum: UILabel!
    @IBOutlet weak var dateLabel: UILabel!
    @IBOutlet weak var tagLabel: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    var model:OrdersModel {
        set{
            
            self.orderNum.text = newValue.number
            self.dateLabel.text = newValue.createTime
            // state  1待处理 2已处理
            if newValue.state == 1 {
                self.tagLabel.text = "待处理"
                self.tagLabel.textColor = UIColor.init(hexColor: "#f7c201")
            }else{
                self.tagLabel.text = "已处理"
                self.tagLabel.textColor = UIColor.init(hexColor: "#999999")
            }
        }
        get{
            return self.model
        }
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
